<template>
	<div class="kaoguanguanli" style="background: #edeff0;">
    <top></top>
    <div class="flexcc">
      <img src="../../../static/img2/banner2.png">
    </div>

    <div class="ww " style="margin: 30px auto;">
      <div style="margin-bottom: 30px;">
        <el-breadcrumb separator="/">
          <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
          <el-breadcrumb-item><a href="/pc/saishijieshao">赛事介绍</a></el-breadcrumb-item>
          <el-breadcrumb-item>{{all.name}}</el-breadcrumb-item>
        </el-breadcrumb>
      </div>
      <div>
        <div style="background: #fff; width: 100%; border-radius: 10px; padding: 30px; position: relative;">
          <div class="flexcc" style="position: absolute; right: 30px; top: 30px;">
            <el-button type="primary" @click.stop="baomingkai()">立即报名</el-button>
            <el-button type="primary" @click.stop="chakanchengji(all)">查看成绩</el-button>
          </div>
          <div style="font-size: 24px; font-weight: bold; margin-bottom: 30px; padding-bottom: 20px; border-bottom: 1px #ccc solid; text-align: center;">{{all.name}}</div>
          <div style="font-size: 14px; color: #333; line-height: 35px;">
            <div>报名时间：{{all.sign_up_time_start}}  -  {{all.sign_up_time_end}}</div>
            <div>比赛时间：{{all.match_time_start}}  -  {{all.match_time_end}}</div>
            <div v-if="all.province != '全国'">比赛地点：{{all.province}}{{all.city}}{{all.district}}</div>
            <div v-if="all.province == '全国'">比赛地点：全国</div>
            <div>比赛状态：<span style="color:#f00">{{all.competition_status_name}}</span></div>
            <div>价格：<span style="color:#f00">{{all.price}}</span>元</div>
            <div style="font-weight: bold;">比赛章程</div>
            <div v-html="all.event_regulations"></div>
            <div style="font-weight: bold;">软件教程</div>
            <div v-html="all.software_tutorials"></div>
          </div>

        </div>
      </div>


    </div>
    <baoming ref="baoming" @baomingwancheng="baomingwancheng"></baoming>
	</div>
</template>

<script>
  import baoming from './baoming.vue'
  import top from '../top.vue'
	export default {
		name: 'kaoguanguanli',
    components:{
      top,baoming
    },
		data() {
			return {
        list:[],
        all:""
			}
		},
		created() {
      this.change2()
		},
		mounted() {
      if(this.$route.query.d){
        this.baomingkai()
      }
		},
		methods: {
      chakanchengji:function(){
        this.$message.error('很抱歉，目前比赛成绩尚未公布，请您耐心等待。');
        // $router.push('/saishijieshao/chengji?id=' + scope.row.id)
      },
      baomingwancheng:function(){

      },
      baomingkai:function(){
        this.$refs.baoming.baomingkai()
      },
      change2:function(item){
        axios.get(this.IP_URL + '/api/competition/info?id=' + this.$route.query.id).then((response)=>{
        	if (response.data.msg.code == 0) {
            this.all = response.data.data
        	} else {
        		this.$message.error(response.data.msg.info);
        	}
        })
      },
      getlist:function(){
        axios.get(this.IP_URL+'/api/web/about/get').then((response)=>{
        	if (response.data.msg.code == 0) {
            this.list = response.data.data.data
            if(this.list.length > 0){
              this.change2(this.list[0])
            }
        	} else {
        		this.$message.error(response.data.msg.info);
        	}
        })
      },

    }
	}
</script>
<style scoped >

</style>
